//
//  SuperSDKPluginToolsTests.m
//  SuperSDKPluginToolsTests
//
//  Created by wyht－ios－dev on 2017/7/26.
//  Copyright © 2017年 WYHT. All rights reserved.
//

#import <XCTest/XCTest.h>
#import "SSDKPluginHttpUtil.h"

@interface SuperSDKPluginToolsTests : XCTestCase

@end

@implementation SuperSDKPluginToolsTests

- (void)setUp {
    [super setUp];
    // Put setup code here. This method is called before the invocation of each test method in the class.
}

- (void)tearDown {
    // Put teardown code here. This method is called after the invocation of each test method in the class.
    [super tearDown];
}

- (void)testExample {
    // This is an example of a functional test case.
    // Use XCTAssert and related functions to verify your tests produce the correct results.
    XCTestExpectation *expectation = [self expectationWithDescription:@"High Expectations"];
    [SSDKPluginHttpUtil postWithUrl:@"http://www.baidu.com"
                               data:@{@"aaa":@"b"}
                           delegate:^(BOOL networkAvaliable, NSInteger status, NSString *resData) {
                               NSLog(@"status=%@,response=%@", status, resData);
                               [expectation fulfill];
                           } retry:1];
    [self waitForExpectationsWithTimeout:20.0 handler:^(NSError *error) {
        if (error) {
            NSLog(@"Timeout Error: %@", error);
        }
    }];
}

- (void)testPerformanceExample {
    // This is an example of a performance test case.
    [self measureBlock:^{
        // Put the code you want to measure the time of here.
    }];
}

@end
